<template>
        
       <div>
            <ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media" v-for="item in newlist" :key="item.id">
					<router-link :to="'/home/newsInfo/'+item.id">
						<img class="mui-media-object mui-pull-left" :src=item.imgurl>
						<div class="mui-media-body">
							1.举杯无畏青衫少年
                            <div >
                            <span class='mui-ellipsis'>发表时间:{{item.addtime | dateFormat}}</span>
                            <span class="number"> 点击: {{newlist.length-item.id}}</span>
                            </div>
						</div>
					</router-link>
				</li>
			</ul>


       </div>

</template>



<script>
export default {

     data:function() {
            
            return{
                newlist:[]

            };
        },

        created() {
            this.getNewsList()
        },

        methods: {
            getNewsList() {
                    for(var i = 0 ; i < 15;i++) {
                        if(i %2 === 0) {
                        this.newlist.push({
                            id:i,
                            addtime:new Date(),
                            imgurl:"../../images/shuijiao.jpg"
                            });

                        } else {
                            this.newlist.push({
                            id:i,
                            addtime:new Date(),
                            imgurl:"../../images/muwu.jpg"
                            });     
                        }
                    }
            }
        },
        components: {

        }
    
}
</script>


<style lang="less" scoped>
    
    .mui-media-body {
        font-size: 13px;
        div {
            display: flex;
            justify-content: space-between;

            span {
             color: #226aff;
             font-size: 11px;
            }
        }
    }


</style>